<template>
  <div>
    <template v-for="(item, index) in options">
      <template v-if="values == item.value">
        <span
          v-if="dataType == 'default' || dataType == ''"
          :key="item.value"
          :index="index"
          >{{ item.label }}</span
        >
        <el-tag
          v-else
          :disable-transitions="true"
          :key="item.value"
          :index="index"
          :type="item.type"
        >
          {{ item.label }}
        </el-tag>
      </template>
    </template>
  </div>
</template>
<script setup lang="ts">
import { ref, reactive, defineEmits, onMounted, watch } from "vue";
import { getDicts } from "/@ts/axios/urlApi/system";

const emit = defineEmits(["update:modelValue"]);
const state = reactive({
  options: [],
  selectValue: "",
});

let prop = defineProps({
  values: {
    type: [String, Number, Array],
    default: "",
  },
  size: {
    type: String,
    default: "",
  },
  dataType: {
    // 渲染类型  default primary
    type: String,
    default: "default",
  },
  options: {
    type: Array,
    default: () => [],
  },
});

const handleSelect = () => {
  emit("update:modelValue", state.selectValue);
};
</script>

<style scoped lang="scss"></style>
